<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
      <ui:composition template="template.xhtml">
      <ui:define name="content">  
    
             
      <h:body>
          <form class="form-horizontal well">
                <fieldset>
        <h:form>
            
          <legend>Cadastro de Paciente</legend>
          <div class="control-group">
            <label class="control-label" for="input01">Nome:</label>
            <div class="controls">
                <h:inputText style="width:300px" value="#{pacienteMBean.nome}"/>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input01">Sexo:</label>
            <div class="controls">
                
            
            <p:selectOneRadio id="genero" value="#{pacienteMBean.sexo}" >  
                            <f:selectItem itemLabel="Masculino " itemValue="m"/>  
                            <f:selectItem itemLabel="Feminino " itemValue="f" />                           
                        </p:selectOneRadio>  
           </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input10">Nascimento:</label>
            <div class="controls">
                <input type="text" class="input" id="input10" value="#{pacienteMBean.obj.nascimento}"/>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input02">CPF:</label>
            <div class="controls">
                <h:inputText value="#{pacienteMBean.cpf}"/>
            </div>
          </div>
          
          <div class="control-group">
            <label class="control-label" for="input04">Telefone:</label>
            <div class="controls">
                <h:inputText value="#{pacienteMBean.telefone}"/>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input11">Email:</label>
            <div class="controls">
            <h:inputText value="#{pacienteMBean.email}"/>
            </div>
          </div>
          <div class="row">
              <div class="span6">
                <div class="control-group">
                    <label class="control-label" for="input05">Endereço:</label>
                    <div class="controls">
                        <h:inputText style="width:400px" value="#{pacienteMBean.rua}"/>
                    </div>
                </div>
              </div>
              <div class="span0">
                <div class="control-group">
                   <label class="control-label" for="input06">N°:</label> 
                    <div class="controls">
                        <h:inputText style="width:30px" value="#{pacienteMBean.numero}"/>
                    </div>
                </div>
              </div>
          </div>
          <div class="row">
              <div class="span4">
                <div class="control-group">
                    <label class="control-label" for="input07">Bairro:</label>
                    <div class="controls">
                    <h:inputText style="width:220px" value="#{pacienteMBean.bairro}"/>
                    </div>
                </div>
              </div>
              <div class="span4">
                <div class="control-group">
                    <label class="control-label" for="input08">Cidade:</label>
                    <div class="controls">
                        <h:inputText  style="width:250px" value="#{pacienteMBean.cidade}"/>
                    </div>
                </div>
              </div>
              <div class="span2">
                <div class="control-group">
                    <label class="control-label" for="input09">UF:</label>
                    <div class="controls">
                        <h:inputText  style="width:25px" value="#{pacienteMBean.estado}"/>
                    </div>
                </div>
              </div>
          </div> 
          
         
          
          
          
          <!-- PRECISA AJEITAR -->
          <br/>
          
          <div align="center">
              <h:commandButton value="Cadastrar" class="btn btn-primary" action="#{pacienteMBean.submeter}"></h:commandButton>    
          </div>
              
        </h:form> 
             </fieldset>
            </form>
             
          
        
      
  
       
        
         </h:body>
      </ui:define>
   </ui:composition>
</html>